//
// Created by 19594 on 25-6-4.
//

#ifndef LCD_H__
#define LCD_H__
#include "main.h"
typedef struct  
{										    
    uint16_t width;			//LCD 宽度
    uint16_t height;			//LCD 高度
    uint16_t id;				  //LCD ID
    uint8_t  dir;			  //0 竖屏 1横屏
    uint16_t	 wramcmd;		//开始写gram
    uint16_t  setxcmd;		//设置x坐标
    uint16_t  setycmd;		//设置y坐标
}_lcd_dev;
extern _lcd_dev lcddev;
#define USE_HORIZONTAL  	 1
#define LCD_W 240
#define LCD_H 320
extern uint16_t  POINT_COLOR;//画笔颜色
extern uint16_t  BACK_COLOR;//背景颜色
extern const unsigned char gImage_pic[63720];
//画笔颜色
#define WHITE       0xFFFF
#define BLACK      	0x0000
#define BLUE       	0x001F
#define BRED        0XF81F
#define GRED 			 	0XFFE0
#define GBLUE			 	0X07FF
#define RED         0xF800
#define MAGENTA     0xF81F
#define GREEN       0x07E0
#define CYAN        0x7FFF
#define YELLOW      0xFFE0
#define BROWN 			0XBC40 //棕色
#define BRRED 			0XFC07 //棕红色
#define GRAY  			0X8430 //灰蓝色
//gui颜色
#define DARKBLUE      	 0X01CF	//深蓝色
#define LIGHTBLUE      	 0X7D7C	//浅蓝色
#define GRAYBLUE       	 0X5458 //灰蓝色
void LCD_Init();
void LCD_RESET();
void LCD_Clear(uint16_t Color);
void LCD_SetWindows(uint16_t xStar, uint16_t yStar,uint16_t xEnd,uint16_t yEnd);
void LCD_SetCursor(uint16_t Xpos, uint16_t Ypos);
void LCD_ShowString(uint16_t x,uint16_t y,uint8_t size,uint8_t *p,uint8_t mode);
void LCD_ShowNum(uint16_t x,uint16_t y,uint32_t num,uint8_t len,uint8_t size);
void LCD_direction(uint8_t direction);
void Gui_Drawbmp16(uint16_t x,uint16_t y,uint16_t height,uint16_t width,const unsigned char *p);
void LCD_DrawLine(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
void LCD_DrawPoint(uint16_t x,uint16_t y);
void gui_circle(int xc, int yc,uint16_t c,int r, int fill);
#endif //LCD_H
